<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>经费申请</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav fs_xl">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title fs_xl">经费申请</h1>
		</header>
		<include file="public/station_nav" />
		<div class="mui-content fs_xl" style="padding-bottom: 3em;">
		    <form class="mui-input-group" method="post" style="padding-bottom: 1em;">
				<div class="mui-input-row" style="margin-top: 1em;">
					<label class="fs_m">申请秘书长：</label>
					<input type="text" value="{$station_info.user_name}" disabled class="fs_m" placeholder="秘书长姓名">
				</div>
				<div class="mui-input-row">
					<label class="fs_m">秘书长ID：</label>
					<input type="text" value="{$station_info.user_id|sprintf='%09d',###}" disabled class="fs_m" placeholder="秘书长ID">
				</div>
				<div class="mui-input-row">
					<label class="fs_m">申请俱乐部：</label>
					<input type="text" value="{$station_info.name}" disabled class="fs_m" placeholder="申请俱乐部名称">
				</div>
				<div class="mui-input-row">
					<label class="fs_m">经费用途：</label>
					<input type="text" name="source" class="mui-input-clear fs_m" placeholder="申请经费的用途">
				</div>
				<div class="mui-input-row">
					<label class="fs_m">使用日期：</label>
					<input type="text" id='demo2' name="start_time" id="start_time" data-options='{"type":"date","beginYear":2017,"endYear":2030}' class="btn mui-input-clear fs_m" placeholder="经费需求的时间" onchange="checktime()">
				</div>
				<div class="mui-input-row">
					<label class="fs_m">申请金额：</label>
					<input type="number" name="money" class="mui-input-clear fs_m" placeholder="申请经费的金额">
				</div>
				<div class="mui-input-row last2" style="height:6em;margin-top: 0.6em;">
					<label class="fs_m" style="line-height: 6em;" class="fs_m">理由陈述：</label>
					<textarea class="fs_m"  name="des" style="border: 1px solid #ccc;width:65%;height: 6em;margin-right: 0.7em;color: #999;" id="textarea" rows="5" placeholder="申请理由陈诉"></textarea>
				</div>
				<div class="mui-button-row">
					<button type="submit" class="mui-btn mui-btn-primary" onclick="return true;">提交申请</button>&nbsp;&nbsp;
					<button type="button" id="cancel" class="mui-btn mui-btn-danger" >取消申请</button>
				</div>
			</form>
		</div>
		<script type="text/javascript">
			(function($) {
				$.init();
				var btns = $('.btn');
				btns.each(function(i, btn) {
					var result = $(this)[0];
					btn.addEventListener('tap', function() {
						var optionsJson = this.getAttribute('data-options') || '{}';
						var options = JSON.parse(optionsJson);
						var id = this.getAttribute('id');
						var picker = new $.DtPicker(options);
						picker.show(function(rs) {
							result.value =rs.text;
							picker.dispose();
						});
					}, false);
				});
			})(mui);
			function checktime(){
    			var name=$("#start_time").val();
//  			var nameRegex=/^[^@#]{3,16}$/;
    			if(name==""){
    				alert("举办时间必须选择哦！");
    				return false;
    			}			
			}
			function checkaddr(){
    			var name=$("#address_desc").val();
//  			var nameRegex=/^[^@#]{3,16}$/;
    			if(name==""){
    				alert("请填写举办品酒会的详细地址！");
    				return false;
    			}			
			}
			function check(){
				checktime();
				checkaddr();
				return false;
			}
			
			$(function(){
				$("#cancel").click(function(){
					window.location.href = "/mobile/station";
				})
			});
		</script>
	</body>

</html>